<template>
  <div>
      <input type="text" v-model="value">
      <button @click="getDay">计算</button>(以数字形式输入生日)
      <h3>这个没写完</h3> <br>
     活了{{day !== '' ? day : 'xx'}}天
  </div>
</template>

<script>
export default {
  data () {
    return {
      day: '',
      value: ''
    }
  },
  created () {
  },
  methods: {
    getDay () {
      const a = new Date()
      const b = new Date(this.value)
      const c = a - b
      console.log(c)
    }
  }
}
</script>

<style>

</style>
